import request from '@/util/request';

export const getShopCate = function(param){
	var url = '/shop/getShopCate';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getShopCateS = function(param){
	var url = '/shop/getShopCateS';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getGoodsList = function(param){
	var url = '/shop/getGoodsList';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getGoodDetail = function(param){
	var url = '/shop/getGoodDetail';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getShopDetail = function(param){
	var url = '/shop/getShopDetail';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getShopGoodsList = function(param){
	var url = '/shop/getShopGoodsList';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const addCart = function(param){
	var url = '/shop/addCart';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getCart = function(param){
	var url = '/shop/getCart';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const removeCart = function(param){
	var url = '/shop/removeCart';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const clearCart = function(param){
	var url = '/shop/clearCart';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const numChangeCart = function(param){
	var url = '/shop/numChangeCart';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const recommendGoods = function(param){
	var url = '/shop/recommendGoods';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getOrderList = function(param){
	var url = '/shop/getOrderList';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getOrderDetail = function(param){
	var url = '/shop/getOrderDetail';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const createOrder = function(param){
	var url = '/shop/createOrder';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const confirmOrder = function(param){
	var url = '/shop/confirmOrder';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getAddress = function(param){
	var url = '/user/getAddress';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const editAddress = function(param){
	var url = '/user/editAddress';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const delAddress = function(param){
	var url = '/user/delAddress';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const editAddressLabel = function(param){
	var url = '/user/editAddressLabel';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}

export const getHomeShopNav = function(param){
	var url = '/shop/getHomeShopNav';
	return request({
		method: 'post',
		url: url,
		data: param
	});
}